package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TFeedbackMapper;
import com.ruoyi.business.domain.TFeedback;
import com.ruoyi.business.service.ITFeedbackService;

/**
 * 意见反馈Service业务层处理
 * 
 * @author laoguo
 * @date 2025-08-12
 */
@Service
public class TFeedbackServiceImpl implements ITFeedbackService 
{
    @Autowired
    private TFeedbackMapper tFeedbackMapper;

    /**
     * 查询意见反馈
     * 
     * @param feedbackId 意见反馈主键
     * @return 意见反馈
     */
    @Override
    public TFeedback selectTFeedbackByFeedbackId(Long feedbackId)
    {
        return tFeedbackMapper.selectTFeedbackByFeedbackId(feedbackId);
    }

    /**
     * 查询意见反馈列表
     * 
     * @param tFeedback 意见反馈
     * @return 意见反馈
     */
    @Override
    public List<TFeedback> selectTFeedbackList(TFeedback tFeedback)
    {
        return tFeedbackMapper.selectTFeedbackList(tFeedback);
    }

    /**
     * 新增意见反馈
     * 
     * @param tFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int insertTFeedback(TFeedback tFeedback)
    {
        tFeedback.setCreateTime(DateUtils.getNowDate());
        return tFeedbackMapper.insertTFeedback(tFeedback);
    }

    /**
     * 修改意见反馈
     * 
     * @param tFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int updateTFeedback(TFeedback tFeedback)
    {
        tFeedback.setUpdateTime(DateUtils.getNowDate());
        return tFeedbackMapper.updateTFeedback(tFeedback);
    }

    /**
     * 批量删除意见反馈
     * 
     * @param feedbackIds 需要删除的意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteTFeedbackByFeedbackIds(Long[] feedbackIds)
    {
        return tFeedbackMapper.deleteTFeedbackByFeedbackIds(feedbackIds);
    }

    /**
     * 删除意见反馈信息
     * 
     * @param feedbackId 意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteTFeedbackByFeedbackId(Long feedbackId)
    {
        return tFeedbackMapper.deleteTFeedbackByFeedbackId(feedbackId);
    }
}
